﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PloobsEngine.SceneControl;
using PloobsEngine.IA;
using System.Xml.Serialization;

namespace Etapa1.ComercioEspacial
{
    [Serializable]
    public class Planeta : IAgent
    {
        public Planeta(IObject representacao)
        {
            this.representacao = representacao;
            representacao.Agente = this;
        }

        public Planeta()
        {
        }

        public IObject init()
        {
            comercio.Initialize();
            IObject o = serializer.GetObject();
            representacao = o;            
            o.Agente = this;
            return o;
        }


        public ObjSerializer serializer = new ObjSerializer();

        [XmlIgnoreAttribute]
        public IObject representacao;

        public String NomeSistema;

        public CentroComercio comercio;

        #region IAgent Members

        public void Update(Microsoft.Xna.Framework.GameTime gt)
        {
        
        }

        [XmlIgnoreAttribute]
        public IObject Obj
        {
            get
            {
                return representacao;
            }
            set
            {
                this.representacao = value;
            }
        }

        #endregion
    }
}
